package com.yanqu.road.entity.activity.peakseacraft.config;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_s_activity_seacraft_lastguess")
public class PeakSeacraftLastGuessConfig {
    @FieldTypeAnnotation(desc = "活动ID", update = true, select = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "序号", update = true)
    private int id;
    @FieldTypeAnnotation(desc = "猜中参数猜中名次")
    private String count;
    @FieldTypeAnnotation(desc = "文本")
    private String desc;
    @FieldTypeAnnotation(desc = "奖励")
    private String award;
    @FieldTypeAnnotation(desc = "是否展示")
    private int show;

    private List<Integer> guessRankList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;

        this.guessRankList = StringUtils.stringToIntegerList(count, "\\|");
    }

    public List<Integer> getGuessRankList() {
        return guessRankList;
    }

    public int getGuessRankCount() {
        return this.guessRankList.size();
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getAward() {
        return award;
    }

    public void setAward(String award) {
        this.award = award;
    }

    public int getShow() {
        return show;
    }

    public void setShow(int show) {
        this.show = show;
    }
}
